1. Field of the Invention
The present invention relates to an image processing apparatus and method equipped with a memory which compresses and stores image data coming in from an image reading device such as a copying machine, a facsimile device, and a scanner.
2. Description of the Related Art
In copying machines, the sorting and grouping of output sheets is conventionally performed by means of a device that mechanically sorts them or by circulating an original document repeatedly. Thus, reading of the original document takes time and the original document itself is subject to damage.
An electronic sorter that electronically reads and sorts an original document sheet is proposed. The electronic sorter employs a memory capable of storing a plurality of pages of image information. Since the memory is a low-speed, large-capacity hard disk or a high-speed, small-capacity memory, the limitations of a storage speed and memory size make image data subject to a long process wait state or put the sorter into a disabled state. Although a variety of job scheduling methods have been proposed to give a priority to a first user coming to a digital electronic copying machine with a document sheet, immediate-action characteristic and high-speed processing speed today are required to handle bulk copying and a large amount of data output from personal computers.
Although a large-capacity semiconductor memory is used in an attempt to achieve improvements in immediate-action characteristic and processing speed, the storage capacity of the semiconductor memory is still subject to a limitation, and control of the apparatuses within the storage capacity limitation is of a prime concern.
Specifically, the amount of data of an image to be stored is varied if the image, before being stored, is subjected to a diversity of image processings including image magnification (expansion and contraction), image decoration, image editing, and density conversion. Thus, it is difficult to guarantee that the image data is reliably stored.
In view of this, before it is stored in an image memory, the image data is typically compressed to reduce the capacity requirement of the image memory that is ever-increasing. Typically used as an image compression method are MH coding and recently Q-Coder that utilizes arithmetic coding, because they are free from image quality degradation and present a good compression rate.
The amount of the image data compressed through the above compression methods is not known until a compression process is fully completed. When an image reader sequentially reads original document sheets, it goes to a next document after determining that an image memory can store the data of a first original document sheet after it is compressed. When the image reader determines that the image memory is unable to store or accommodate the data of the first document sheet, it needs to read the first document sheet again. These steps lower substantially the processing speed of the image processing apparatus.
A compression rate or compression factor is not always constant to all images, and thus not always stable among all image data. Specifically, the compression rate is varied, for example, high in textual documents and low in photographic documents. For this reason, in the vicinity of the limitation of the storage capacity of the image memory, the amount of compressed data of a photographic document is larger than the remaining capacity still available the image memory while the amount of compressed data of a textual document is smaller than the remaining capacity still available in the image memory. Thus, the image memory cannot be efficiently used in the vicinity of the storage capacity limitation of the image memory.